# import pandas as pd
# import sys
# import math
# import LLM
#
# # 暂时不用
# # 读取地图信息
# file_map = 'map.csv'
# df_map = pd.read_csv(file_map, header=None)
# map_matrix = df_map.values
# map_prompt = ''
# map_prompt += (
#     'Coordinates other than roads on the map are obstacles or buildings, and you can only walk on the roads.\n'
#     'The road coordinates of the town map are given below.\n'
#     'For example,\n'
#     'Row 4，columns，15 to 165, means that from the 15th column to the 165th column of the 4th row are all roads\n'
#     'columns 15，row，4 to 146, means that from the 4th row to the 146th row of the 15th columns are all roads\n')
# for i in range(map_matrix.shape[0]):
#     len_1 = 0
#     st = 0
#     tmp_row_prompt = ''
#     tmp_row_prompt += 'Row ' + str(i) + '，columns'
#     for j in range(map_matrix.shape[1]):
#         if map_matrix[i][j] == 1:
#             if len_1 == 0:
#                 st = j
#             len_1 += 1
#         else:
#             if len_1 > 0:
#                 if len_1 > 2:
#                     tmp_row_prompt += '，' + str(st) + ' to ' + str(j - 1)
#                 len_1 = 0
#     if len_1 > 0:
#         if len_1 > 2:
#             tmp_row_prompt += '，' + str(st) + ' to ' + str(map_matrix.shape[1] - 1)
#     tmp_row_prompt += '\n'
#     if len(tmp_row_prompt) > 20:
#         map_prompt += tmp_row_prompt
# for j in range(map_matrix.shape[1]):
#     len_1 = 0
#     st = 0
#     tmp_columns_prompt = ''
#     tmp_columns_prompt += 'columns ' + str(j) + '，row'
#     for i in range(map_matrix.shape[0]):
#         if map_matrix[i][j] == 1:
#             if len_1 == 0:
#                 st = i
#             len_1 += 1
#         else:
#             if len_1 > 0:
#                 if len_1 > 2:
#                     tmp_columns_prompt += '，' + str(st) + ' to ' + str(i - 1)
#                 len_1 = 0
#     if len_1 > 0:
#         if len_1 > 2:
#             tmp_columns_prompt += '，' + str(st) + ' to ' + str(map_matrix.shape[0] - 1)
#     tmp_columns_prompt += '\n'
#     if len(tmp_columns_prompt) > 20:
#         map_prompt += tmp_columns_prompt
#
# map_prompt += 'Now please tell me if the coordinates (4,10) are on the road?'
# info = {'map_prompt': map_prompt}
# response = LLM.get_response_from_llm(3, info)
# if __name__ == '__main__':
#     print(response)
